import request from '@/config/axios'

/**
 * 获取单个客户
 */
export const singleGet = (id) => {
  return request.get({ url: '/infra/devops/customer/single-get?id=' + id })
}

/**
 * 删除客户
 */
export const deleted = (id) => {
  return request.delete({ url: '/infra/devops/customer/deleted?id=' + id })
}

/**
 * 更新客户
 */
export const update = (data) => {
  return request.put({ url: '/infra/devops/customer/update', data })
}

/**
 * 新增客户
 */
export const create = (data) => {
  return request.post({ url: '/infra/devops/customer/create', data })
}

/**
 * 分页查询客户
 */
export const pageQuery = (params) => {
  return request.get({ url: '/infra/devops/customer/page-query', params })
}

/**
 * 根据服务器上的客户信息
 */
export const getServerCustomerInfo = (data) => {
  return request.post({ url: '/infra/devops/customer/get-server-customer-info', data })
}

/**
 * 获取单个客户信息
 */
export const getSingleCustomerInfo = (data) => {
  return request.post({ url: '/infra/devops/customer/get-single-customer-info', data })
}
